It also provides three methods for accessing array elements: standard indexing, creating subarrays, and slicing, which produces a less dimensional view of an array segment.
它还提供三种访问数组元素的方法:标准索引、创建子数组和切片(slicing),切片能产生维数更小的数组片段的视图。
The segment of the array that the slice references can be changed by assigning a new slice to the same variable.
该切片所引用的数组分段可以通过将新的切片赋值给同一变量来更改。
A slice represents a contiguous segment of an array, allowing a programmer to refer to specific sections of the underlying storage.
一个切片(slice)表示一个数组内的连续分段,支持程序员指定底层存储的明确部分。
应用推荐